package com.atguigu.service;

import com.atguigu.model.cmn.Dict;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface DictService extends IService<Dict> {
    //根据数据id查询子数据列表
    List<Dict> findChlidData(Long id);

    /**
     * 导出到excel
     * @param response
     */
    void exportData(HttpServletResponse response);

    /**
     * 从excel中导入数据
     * @param file
     */
    void importDictData(MultipartFile file);

    //根据dictcode和value查询数据字典
    String getDictName(String dictCode, String value);

    //根据dictCode获取下级节点
    List<Dict> findByDictCode(String dictCode);

    List<Map<String, Dict>> getDictMapByVal(List<String> valueList);

}

